Computer programs are often designed so that users who speak different languages can use the computer programs. These computer programs typically provide their text information in the language of the user. A developer of a computer program may create an English version and a French version of the computer program. Alternatively, a developer of a computer program may create a language-independent version of the computer program and may also create a language file for different languages. Each language file contains the text information for one language. When the language-independent version of computer program is executed, it retrieves the appropriate text information from the language file for the language of the user. In this way, computer programs can be extended to support additional languages by creating additional language files. The process of creating a language-independent version of a computer program is referred to as “internationalization.” The process of creating language files for different languages is referred to as “localization.”
It may be especially important to internationalize web sites because the World Wide Web by its very nature is accessible by users throughout the world. Any user of the World Wide Web from any country can access any web site of the World Wide Web provided the user has the appropriate authorization. Moreover, since most web sites do not require authorization, most web sites are accessible to any user. Of course, a French-speaking user may not be able to effectively use a web site that is published only in English. As a result, many organizations develop different web sites for different countries or languages. These organizations typically create a new web site by creating a modified version of an existing web site that supports a new language, rather than the language of the existing web site. For example, the new language may be French, and the language of the existing web site may be English. From that point on, desired modifications need to be made to both web sites. The process of making desired modifications to multiple web sites may be expensive, time-consuming, and error prone.
Current web sites typically support dynamic generation of web pages by web servers. When a web server receives from client computers requests for web pages, the web server may generate the web page (e.g., an HTML document) on demand. One technique for server-side, dynamic generation of web pages is referred to as server-executable web pages. Examples of server-executable web pages include JavaServer Pages (“JSP's”) as defined by Sun Microsystems and active server pages (“ASP's”) as defined by Microsoft. The server-executable web pages such as JSP's contain elements, referred to as custom tags, that specify how to generate a web page. A server-side engine executes a JSP to generate the web page, which can then be forwarded to the requesting client computer. A JSP may include HTML tags, JSP tags, and executable code or scripts. A JSP tag identifies code that is executed on the server to generate a portion of the web page. Developers of JSP's can define custom tags that are associated with custom code written by developers. When the JSP engine encounters a custom tag, it instantiates an object associated with that custom tag, sets attributes associated with that tag, and then requests the object to generate its portion of the web page or perform some action based on the attributes passed to the tag. The attributes of a tag may be set to text strings that may need to be modified to support the localization of a web page.
Dynamic web pages, such as dynamic HTML documents, have client-side executable code. For example, a developer of a web page may want to display text information when the user moves the cursor over an image. The tag associated with the display of the image may have executable code associated with it that is invoked when the user moves the mouse over the image. When the code is invoked, it displays the text associated with the image. That text may need to be modified to support localization of the web page.
It would be desirable to have techniques to a facilitate the internationalization of computer programs in general and web pages, server-executable web pages, and dynamic web pages in particular.